package windows

type counter struct {
}

func (do *counter) Update() {
}

func (do *counter) Incr() {
}

func (do *counter) Reset() {
}

func (do *counter) Sum() int {
	return 0
}

func ParseOptions(opts ...BucketOption) []BucketOption {
	o := []BucketOption{
		WithAdder(func() IncrForCounter {
			return &counter{}
		}),
		WithMaxUpdater(func() UpdateForCounter {
			return &counter{}
		}),
	}

	o = append(o, opts...)
	return o
}

func WithAdder(create NewIncrForCounter) BucketOption {
	return func(b *bucket) error {
		b.Adder = create()
		return nil
	}
}

func WithMaxUpdater(create NewUpdateForCounter) BucketOption {
	return func(b *bucket) error {
		b.MaxUpdater = create()
		return nil
	}
}
